home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1996 June / Software of the Month Club 1996 June.iso / pc / dos / dtp / display / doc / display.faq < prev    next >
Text File  |  1996-01-16  |  26KB  |  628 lines

  1. Table of Contents:
  2. ------------------
  3.      (I)   Tips for different operating systems
  4.      (II)  FAQ
  5.      (III) Some file formats
  6.      (IV)  Some tips
  7.  
  8.  
  9. --------------------------------------------------------------------------------
  10.                PART I -- TIPS FOR DIFFERENT OPERATING SYSTEMS
  11. --------------------------------------------------------------------------------
  12.  
  13. (1). WINDOWS (from Oliver Weyand)
  14.     Start Display under WINDOWS through a PIF file. Give display all
  15.     memory you have (parameters -1 for ems and/or xms in pif-editor),
  16.     because you will have no swap-space in a windows-shell (that's
  17.     ok, because windows will manage the virtual memory). Make sure
  18.     NOT to use a graphic driver in protected mode (windows will show
  19.     you one of this boring error messages), so don't add the 'driver ::p'
  20.     statement to your go32 environment.
  21.     With DISPLAY 1.82 or latter, you are not forced to use VESA driver.
  22.  
  23. (2). OS/2 (from Oliver Weyand, chbrin3@nyx.uni-konstanz.de)
  24.     Load a vesa-driver in your autoexec.bat (under OS/2 this file is only
  25.     executed when you open a DOS shell). Don't use 'driver ::p'. Give it
  26.     enough memory: the standard 4MB dpmi-memory are not enough. Open the
  27.     menu for the DOS shell and edit the entries for memory (EMS,XMS,DPMI).
  28.     Also edit the entries for graphic capabilities. If you won't use the
  29.     autoexec.bat file for display's DOS session, enter the name of the used
  30.     batch file. If you don't understand this things refer to your OS/2
  31.     manual. For further hints how to setting up DOS shells under OS/2 refer
  32.     to the hints that can be found on many ftp servers (if you are an OS/2
  33.     user you will know them, i.e. hobbes).
  34.     It was reported to me, that display won't run under OS/2 at all. Sorry
  35.     guys, can't help you. I just tell you what has worked for me with version
  36.     2.1 on my 486/33. BTW, if you search a good viewer-converter for OS/2
  37.     give Joe-View a chance (joevw128 or higher, shareware).
  38.  
  39. (3). Novell DOS 7 (from Oliver Weyand, chbrin3@nyx.uni-konstanz.de)
  40.     When running display under NWDOS 7 there is only one thing that is
  41.     different from MSDOS: the multitasking environment. You have to make
  42.     sure, that display can't use dpmi. So you can either type 'dpmi off'
  43.     at the NWDOS prompt or add the nodpmi statement to the go32 variable
  44.     (set go32=nodpmi ...) in the runme.bat. Because the NWDOS multitasker
  45.     supports only standart VGA mode you should use display not in graphics-
  46.     text mode (if you do display will switch to plain text after an error
  47.     message). Further the only available graphics mode is 320x200-8bit.
  48.     You can convert files or generate movies in the backround, while you
  49.     play a your favourite game (beware, that you need at least a 486 with
  50.     at least 8-16MB RAM). Because I use NWDOS on a stand-alone machine I
  51.     can't say anything about using display with Netware-Lite.
  52.  
  53. (4). LINUX (reported by Yanming PENG)
  54.     I have done it. DISPLAY 1.87, Linux 1.2.8 +net-driver-patched, dosemu
  55.     0.60.1. On a cosole. DISPLAY runs very well (keyboard only, without
  56.     using mouse). At least it runs with a S3 Trio32 1M card with vesa_s3.prn
  57.     on my pentium S-60 with 16M RAM, XFree86 3.1.1. Using DPMI support under
  58.     dosemu 0.60.1. But it failed to run with my Trident 8900C 1MB card at
  59.     home. Probably the dosemu internal mouse driver cause the problem. QPV
  60.     (aka QPEG 1.6c) also has problem with the internal mouse driver. The
  61.     dosemu 0.60.x now has DPMI 0.90 support and can run some Windows program
  62.     in WinOS2.
  63.     When running display under dosemu 0.60.X under Linux, be sure to edit the
  64.     config.dis to turn the automatic detect Sound Blaster off. Since DISPLAY
  65.     will disable sound in DPMI anyway. Setup enough dpmi memory for dosemu
  66.     in /etc/dosemu.conf to let DISPLAY run comfortably. MPG,AVI,GL etc. work
  67.     greatly.
  68.  
  69.  
  70. --------------------------------------------------------------------------------
  71.                                PART II -- FAQ
  72. --------------------------------------------------------------------------------
  73.  
  74. Q1: How can I convert group of 24-bit images to 8-bit images with the same
  75.     palette table ?
  76. A: Use the following steps:
  77.    1. Find a palette table:
  78.         Tag the images you want. Select 'accumulation quantization' to
  79.         produce a palette table.
  80.         - or -
  81.         press F5, then 'load a palette table'.
  82.    2. press F4, then change 'number of colors option' to 'no effect'.
  83.    3. press F5, then select 'push palette table'.
  84.    4. Tag the images you want. Select 'batch conversion' with two special
  85.       effects:
  86.       (1) 'pop palette table'
  87.       (2) 'color quantization' with 'current palette' option.
  88.  
  89.  
  90. Q2: How can I view the original palette table of an image ?
  91. A: press F4, then change 'number of colors option' to 'no effect'.
  92.  
  93.  
  94. Q3: How can I resize image using percentage ?
  95. A: Just add '%' to end of number, like '120%'.
  96.  
  97.  
  98. Q4: Why does this program show the message, 'CPU must be in real mode' ?
  99. A: It is likely that you have 'device=emm386.exe noems' in config.sys.
  100.    Remove 'noems'.
  101.  
  102. Q5: What is 'response file' ?
  103. A: Response file is used to overcome the 128-byte limit in command line
  104.    length. You can put anything in response file just as in command line.
  105.    For example, you can put the following lines in IMAGE.LST :
  106.  
  107. aaa.gif
  108. bbb.jpg
  109. ccc.bmp
  110.  
  111.    then use 'DISPLAY --slide @IMAGE.LST' to do slide show.
  112.  
  113. Q6: What is 'description file' ?
  114. A: Desciprtion file is a file containing the description for each image
  115.    in current directory. It can help you remember what is in each image.
  116.    You can change the file name to whatever you want (Please read the
  117.    TEXT section in config.dis).
  118.    The standard file name for 4DOS (another command processor for MS-DOS
  119.    which can replace COMMAND.COM) is descript.ion. If you want to manipulate
  120.    description file yourself, I suggest that you get 4UTILS??.ZIP from
  121.    simtel20 mirror sites.
  122.    Please see PART III for the format. The format used in 4DOS is more
  123.    complicated than that listed here.
  124.  
  125. Q7: What files are needed for minimal usage ?
  126. A: The minimal set of needed files is :
  127.    GO32.EXE, DISPLAY.EXE, RUNME.BAT, one Video Driver, CONFIG.DIS,
  128.    EMU387(if you don't have x87), Fonts(if you want contact sheet).
  129.    Any thing else can be deleted.
  130.  
  131. Q8: Why don't movie and mouse work in Windows or OS/2 environment ?
  132. A: Because of the timer problem, movies are not supported in these environments.
  133.    Mouse in these environments is not stable yet, so I disable it in the
  134.    official release.
  135.  
  136. Q9: What is 'processing target' ?
  137. A: DISPLAY can store both 8-bit and 24-bit images in memory. You must select
  138.    one from the two. If 'img8' is highlighted, all operations are performed
  139.    upon 8-bit image. Otherwise 24-bit image is used.
  140.  
  141. Q10: What is 'linking' ?
  142. A: For people who have 8-bit(256 colors) video card only, there is no
  143.    possibility to view true-color image. Because 24-bit image is quantized
  144.    to 8-bit before viewing. Can I crop true-color image manually in graphic
  145.    mode ? Yes, by setting resource 'auto_link_24_to_8' when you crop 8-bit
  146.    image, 24-bit image is cropped, too. 'linking' works for cropping only.
  147.  
  148. Q11: How can I make a new video driver ?
  149. A: Look at the DRVSRC directory. Find a source file that is close to your
  150.    video card. Use text editor to edit the source file. Follow the commands
  151.    in makefile to make a new video driver.
  152.    All video drivers are borrowed from DJGPP and GRX.
  153.    You can get the whole DJGPP and GRX package from :
  154.      omnigate.clarkson.edu: /pub/msdos/djgpp
  155.      or simtel20 mirros sites.
  156.    You must understand assembly language. I suggest that you use et4000.asm
  157.    as a template.
  158.  
  159. Q12: How can I increase the JPEG decompression speed ?
  160. A: set jpeg_fast_decode to 1. If you have only 8-bit(256 colors) display card,
  161.    you should tune two additional parameters: jpeg_quantization & 
  162.    jpeg_color_dither. For the fastest speed, set jpeg_quantization to 'Grey256'
  163.    or '1 Pass' and jpeg_color_dither to 'Ordered'.
  164.    Please read the PROCESS_CONTROL section in config.dis.
  165.  
  166. Q13: What do the JPEG-related parameters mean ?
  167. A: For the Decompression parameters, please read the PROCESS_CONTROL section
  168.    in config.dis.
  169.    For Compression parameters : (Borrowed from IJG document)
  170.      Quality :
  171.        The quality switch lets you trade off compressed file size against
  172.        quality of the reconstructed image: the higher the quality setting,
  173.        the larger the JPEG file, and the closer the output image will be to
  174.        the original input.  Normally you want to use the lowest quality
  175.        setting (smallest file) that decompresses into something visually
  176.        indistinguishable from the original image.  For this purpose the
  177.        quality setting should be between 50 and 95; the default of 75 is
  178.        often about right.  If you see defects at -quality 75, then go up 5 or
  179.        10 counts at a time until you are happy with the output image.  (The
  180.        optimal setting will vary from one image to another.)
  181.  
  182.        quality 100 will generate a quantization table of all 1's,
  183.        eliminating loss in the quantization step (but there is still
  184.        information loss in subsampling, as well as roundoff error).  This
  185.        setting is mainly of interest for experimental purposes.    Quality
  186.        values above about 95 are not recommended for normal use; the
  187.        compressed file size goes up dramatically for hardly any gain in
  188.        output image quality.
  189.  
  190.      Optimize:
  191.        Perform optimization of entropy encoding parameters.  Without
  192.        this, default encoding parameters are used. optimize usually
  193.        makes the JPEG file a little smaller, but DISPLAY runs somewhat
  194.        slower and needs much more memory.  Image quality and speed of
  195.        decompression are unaffected by optimize.
  196.  
  197.      Smooth N:
  198.        Smooth the input image to eliminate dithering noise. N ranging
  199.        from 1 to 100, indicates the strength of smoothing. 0 (the
  200.        default) means no smoothing.
  201.        The smooth option filters the input to eliminate fine-scale noise.
  202.        This is often useful when converting GIF files to JPEG: a moderate
  203.        smoothing factor of 10 to 50 gets rid of dithering patterns in the
  204.        input file, resulting in a smaller JPEG file and a better-looking
  205.        image.  Too large a smoothing factor will visibly blur the image,
  206.        however.
  207.  
  208.      Restart marker N:
  209.        Emit a JPEG restart marker every N MCU rows, restart 0 (the
  210.        default) means no restart markers.
  211.        The restart option inserts extra markers that allow a JPEG decoder to
  212.        resynchronize after a transmission error.  Without restart markers,
  213.        any damage to a compressed file will usually ruin the image from the
  214.        point of the error to the end of the image; with restart markers, the
  215.        damage is usually confined to the portion of the image up to the next
  216.        restart marker.  Of course, the restart markers occupy extra space.
  217.        We recommend restart 1 for images that will be transmitted across
  218.        unreliable networks such as Usenet.
  219.  
  220.      Sample HxV:
  221.        Set JPEG sampling factors.  If you specify fewer H/V pairs than
  222.        there are components, the remaining components are set to 1x1
  223.        sampling.  The default setting is equivalent to sample 2x2.
  224.        This "wizard" switch is intended for experimentation with JPEG.  If
  225.        you don't know what you are doing, don't use them.
  226.  
  227.      Fast JPEG encode:
  228.        Use fast integer DCT (less accurate).
  229.  
  230. Q14: Can I play movie under Windows or OS/2 ?
  231. A: Yes. But the timing is not very accurate. If you use third-party products,
  232.    playing movie may not work.
  233.  
  234. Q15: Should I enable 'skip B frame' in MPEG ?
  235. A: If you want to increase frame rate, enable this option. It increases the
  236.    playing speed, but you will see the discontinuity in playing.
  237.    Don't enable this option when saving each frame.
  238.    
  239. Q16: What is the difference between CURRENT and DEFAULT description file ?
  240. A: DEFAULT is the filename specified in config.dis (in TEXT section). You
  241.    can change it within DISPLAY. (function key F4)
  242.    CURRENT is the filename you select by using function key 'g' or 'G'.
  243.    When you change to a new directory, description file is reset to the
  244.    DEFAULT. At this time, CURRENT is the same as DEFAULT. You can use
  245.    'g' or 'G' to change CURRENT to any file you want, and DISPLAY uses this
  246.    file as description file until you change to another directory. You can also
  247.    change CURRENT back to DEFAULT by function key 'ALT_F'.
  248.    
  249. Q17: Why does DISPLAY not load description or image dimension from description
  250.      file ?
  251. A: You must turn on the 'description' and/or 'dimension' options in
  252.    resource 'extra_text_option' and turn on resource 'read_desc_dim'.
  253.    Note: If the image file size in description file is different from the file
  254.    size DOS reports, dimension is not read. (date and time are not used).
  255.  
  256. Q18: Why does DISLAY not write image dimension to description file ?
  257. A: You must set the resource 'write_desc_dim' to 1 to enable this.
  258.    Note: DISPLAY doesn't automatically write description and/or image dimension
  259.          to description file. You must do this manually (key ALT_W).
  260.  
  261. Q19: What is the difference between normal mouse and mouse ball ?
  262. A: As far as I know, the difference is that mouse ball doesn't have buttons.
  263.    In mouse ball mode, if you move mouse, image will scroll. No button is
  264.    needed. You can use 'mouse_ball_factor' to change the corresponding image
  265.    scrolling rate.
  266.    
  267. Q20: What is INDEX ?
  268. A: INDEX is a .idx file which contains the corresponding contact sheet name
  269.    and the image position within contact sheet. When you select INDEX file,
  270.    DISPLAY loads the corresponding contact sheet and allows you to select 
  271.    which image you want to view within this contact sheet.
  272.    INDEX file is very flexible. You can change the image name and path, so
  273.    that you can view image in other directory or even movie files.
  274.    Note: For those who don't have Hi/True Color card, I suggest that you save
  275.          the contact sheet as 8-bit image.
  276.          
  277. Q21: What is Thumbnail ?
  278. A: Thumbnail is a small image DISPLAY generates that can help to speed up 
  279.    preview. The advantage is no delay for preview. The disadvantage is that
  280.    you need additional disk space for thumbnail. For the format of thumbnail
  281.    file, please read Part III of the file. If you want to know how thumbnail
  282.    works in preview, read 'Preview' section in DISPLAY.DOC.
  283.    
  284. Q22: what is Association ?
  285. A: Assocition is a link between file and program. Though DISPLAY can read
  286.    many file formats, it can't read ALL. You can use association to tell
  287.    DISPLAY what to do with the specified files. You can also use association
  288.    to override the internal behavior in DISPLAY. For example, if you don't
  289.    like the GL player in DISPLAY, you can use the following association to
  290.    view GL with grasprt:
  291.    
  292.      association=.gl,grasprt
  293.      
  294.    Actually you can specify any association you want. Full path and command-
  295.    line switch are allowed.
  296.  
  297. Q23: How can I use Sound Blaster in my computer ?
  298. A: You must set the environment variable BLASTER. Please consult your Sound
  299.    Blaster manual.
  300.    DISPLAY supports SB 1.0 .. 2.0, SB Pro and SB 16. Sample size is limited
  301.    to 8 bits. Stereo sound is supported for SB Pro and SB 16. 
  302.    Sample frequency:
  303.      SB     : 4k .. 23k Hz.
  304.      SB Pro : 4k .. 23k Hz (mono), 4k .. 11.5k Hz (stereo)
  305.      SB 16  : 5k .. 45k Hz (all).
  306.    
  307. Q24: Why does my computer crash when I start DISPLAY if my Sound Blaster
  308.      emulator is loaded ?
  309. A: By default, DISPLAY will check if Sound Blaster exits in your computer.
  310.    If your Sound Blaster emulator doesn't work in protected mode, you must 
  311.    disable this checking by setting 'check_sb' (in config.dis) to 0. In this 
  312.    way, DISPLAY assumes there is no Sound Blaster in your system.
  313.  
  314. Q25: Why can't I use TNL packfile ?
  315. A: Currently DISPLAY only supports packfile in ZIP (Inflate and Store) format.
  316.    You must use PKZIP 2.04g or ZIP 2.0 to generate the packfile.
  317.    
  318. Q26: Why can't DISPLAY play sound with movie ?
  319. A: 1. You don't have SB or compatible sound card. See Q23 and Q24.
  320.    2. The sound track in movie is corrupted.
  321.    3. The sound track coding method is not supported.
  322.    4. The sound track in movie is beyond the capability of your sound card.
  323.    5. Not enough memory in lower 640K memory. DISPLAY allocates buffer in
  324.       lower 640K memory for DMA use.
  325.  
  326. Q27: Why can't I hear sound with MPEG movie ?
  327. A: 1. There must be a WAV file that has the same filename as MPEG file.
  328.       For example, movie.mpg and movie.wav.
  329.    2. See Q26.
  330.    
  331. Q28: Why does audio not synchronize with video ?
  332. A: 1. The sample frequency of audio track is too high. There is no way to
  333.       correct this problem.
  334.    2. Movie play time is too long. Please free SPACE to pause, then pree
  335.       RETURN to continue. DISPLAY auto-synchronize video and audio after
  336.       pause.
  337.    3. Some AVI files is not truely audio-video interleaved. Instead they
  338.       write the whole audio track as single chunk. This causes sound card
  339.       DMA buffer to overflow. Please set 'load sound first' to 1.
  340.       
  341. Q29: Why is screen garbled when sound is played ?
  342. A: If your computer is too slow, DISPLAY discards some frames to keep the
  343.    synchronization between video and audio. This will introduce noise to the
  344.    screen. To fix this problem, you must get a faster computer.
  345.  
  346. Q30: Why can't I play sound under Windows ?
  347. A: Using sound card causes Windows to crash, so sound playing is disabled.
  348.  
  349.  
  350.  
  351. --------------------------------------------------------------------------------
  352.                          PART III -- SOME FILE FORMATS
  353. --------------------------------------------------------------------------------
  354.  
  355. Palette File Format
  356. -------------------
  357.  
  358.   offset  length  content
  359.  
  360.   0       8       "DISPpal0"
  361.   8       4       number of colors(Intel byte order).
  362.   12      4       R,G,B,A for each color.
  363.   ...     ...     ......
  364.  
  365.  
  366.  
  367. YUV Format (from Berkeley MPEG ENCODER package)
  368. ----------
  369.  
  370. The U and V components are subsampled 4:1.
  371.  
  372. To give you an idea of what format the YUV file must be in, the following
  373. code will read in a YUV file:
  374.  
  375.     unsigned char **y_data, **cr_data, **cb_data;
  376.  
  377.     void          ReadYUV(char *fileName, int width, int height)
  378.     {
  379.     FILE *fpointer;
  380.     register int y;
  381.  
  382.     /* should allocate memory for y_data, cr_data, cb_data here */
  383.  
  384.     fpointer = fopen(fileName, "r");
  385.  
  386.     for (y = 0; y < height; y++)            /* Y */
  387.         fread(y_data[y], 1, width, fpointer);
  388.  
  389.     for (y = 0; y < height / 2; y++)            /* U */
  390.         fread(cb_data[y], 1, width / 2, fpointer);
  391.  
  392.      for (y = 0; y < height / 2; y++)            /* V */
  393.          fread(cr_data[y], 1, width / 2, fpointer);
  394.  
  395.     fclose(fpointer);
  396.     }
  397.  
  398.  
  399.  
  400. Raw RGB Format
  401. --------------
  402.  
  403.   for (y = 0; y < height; ++y)
  404.     for (x = 0; x < width; ++x) {
  405.       read RED;        /* 1 byte */
  406.       read GREEN;    /* 1 byte */
  407.       read BLUE;    /* 1 byte */
  408.     }
  409.  
  410.  
  411.  
  412. Raw GREY Format
  413. ---------------
  414.  
  415.   for (y = 0; y < height; ++y)
  416.     for (x = 0; x < width; ++x)
  417.       read GREY;        /* 1 byte */
  418.  
  419.  
  420.  
  421. Contact Sheet Script File Format
  422. --------------------------------
  423.  
  424.   1. Lines start with # are comment lines.
  425.   2. You must add this string to start of the file : "contact_sheet". This
  426.      string is an ID of script file.
  427.   3. You can write up to 2 strings for each image file in script file.
  428.      Each string can be up to 49 characters.
  429.      Strings are separated with the character '|'.
  430.  
  431.      For example : I am 1| You are 2
  432.   4. If possible DISPLAY writes the two strings in the same line.
  433.      For example:  I am 1 You are 2
  434.                          ^ Strings are separated with one SPACE character.
  435.  
  436.      If the total length of two strings is too long, DISPLAY writes the two
  437.      strings in two lines.
  438.      For example:    I am 1
  439.                     You are 2
  440.  
  441.   5. IF string 2 starts with '|', DISPLAY write two strings in two lines
  442.      always.
  443.  
  444.      For example, line 1| |Always line 2
  445.      Output is:    line 1
  446.                 Always line 2
  447.  
  448.   6. If image file name contains path(e.g. c:/qqq/n.gif or ../n.gif), it is
  449.      used as is. Otherwise(no path) current directory is assumed.
  450.  
  451.   7. The following is a sample script file:
  452.  
  453. --------Start--------
  454.  
  455. # This is a sample file
  456.  
  457. contact_sheet
  458.  
  459. ../KIKI-TON.GIF      Kiki's| gif file
  460. c:N.GIF             Nausicaa| gif file
  461. NAUSICAA.GIF    Another Nausicaa
  462. PORCO.GIF       Porco Rosso
  463. d:/tmp/image/TOTOROS.GIF     Totoros| gif
  464. WOTW1.GIF       |line 2 only
  465.  
  466. --------Stop--------
  467.  
  468.  
  469. Description File Format
  470. -----------------------
  471.  
  472. Format:
  473.  
  474. <filename.ext> <Any string up to 149 characters>
  475.  
  476. For example:
  477.  
  478. aaa.gif  this is aaa.gif
  479. bbb.jpg   I am bbb :-)
  480. cat.bmp Oh! There is a cat in this image.
  481.  
  482.  
  483. Batch Contact Sheet Script File Format
  484. --------------------------------------
  485.  
  486.   1. Lines start with # are comment lines.
  487.   2. You must add this string to start of the file : "batch_contact_sheet".
  488.      This string is an ID of script file.
  489.   3. You can load this file from command-line or within DISPLAY.
  490.   4. The format of user input string is in 'Contact Sheet Script File Format'.
  491.   5. SHEET.TPL is a documentation file. Read it.
  492.  
  493.  
  494. Image Dimension Format in Description File
  495. ------------------------------------------
  496.  
  497.   @<ID>Size,Date,Time,Width,Height,Pixel
  498.   
  499. Where:
  500.   @      : a numerical number 4 (i.e. CTRL_D in ASCII)
  501.   <ID>   : a number(byte, 8 bits) assigned by 4DOS. DISPLAY uses 'H'.
  502.   Size   : File size in Hex format.
  503.   Date   : File date in Hex format.
  504.   Time   : File time in Hex format.
  505.   Width  : Image width in Dec format. 0 for non-image file.
  506.   Height : Image height in Dec format. 0 for non-image file.
  507.   Pixel  : Pixel size in Dec format. Must be 0, 1, 3, 11 or 13.
  508.            11 and 13 mean that this file is movie.
  509.  
  510.  
  511. INDEX File Format
  512. -----------------
  513.  
  514. <ID>
  515. conatc_sheet
  516. number
  517. image1 x1 y1 width1 height1
  518. image2 x2 y2 width2 height2
  519. ....
  520. ....
  521.  
  522. Where
  523.   <ID>           : The first line must be the string "DISPLAY_INDEX_FILE".
  524.   conatc_sheet   : The corresponding conatc sheet file of this index.
  525.                    You can include path in the filename. If path is not found,
  526.                    DISPLAY loads contact sheet from current path.
  527.   number         : Number of images in this contact sheet.                   
  528.   image1         : filename of image1 in contact sheet. Path is allowed.
  529.                    image loading is the same as contact sheet.
  530.   x1 y1          : The position of image1 in contact sheet.
  531.   width1 height1 : The bounding box of image1.
  532.   
  533.   Note: You can modify the contact sheet name and image name. Please don't
  534.         modify image position and bounding box.
  535.  
  536. For example:
  537.  
  538. DISPLAY_INDEX_FILE
  539. c:\pic\example\conact.jpg
  540. 3
  541. aaa.gif 0 0 100 100
  542. bbb.bmp 0 100 100 100
  543. c:\pic\good\ccc.jpg 100 0 100 50
  544.  
  545.  
  546. Thumbnail File Format
  547. ---------------------
  548.  
  549.   offset  length  content
  550.  
  551.   0       7            "DISPTNL"
  552.   7       1            Format. '0' : Grey scale Raw.
  553.                                '1' : Grey scale Jpeg.
  554.                                '2' : Color Raw.
  555.                                '3' : Color and grey (raw).
  556.                                '4' : Color and grey (jpeg).
  557.                                '5' : Color Jpeg.
  558.   8       4            thumbnail width (max 200 pixels)
  559.   12      4            thumbnail height (max 200 pixels)
  560.   16      4            original image width
  561.   20      4            original image height
  562.   24      16           original image name, padded with 0.
  563.   40      128          reserved, must be 0.
  564.   168     variable     thumbnail image.
  565.  
  566.  
  567. Tables in mask translation (by Bernhard Maerz)
  568. --------------------------
  569.  
  570.  1. Brightness adjust
  571.  
  572.     for (y = 0; y <= 255; ++y)
  573.       for (x = 0; x < 256; ++x) {
  574.         if (y <= 128) *table++ = ((x * y) / 128);
  575.         else *table++ = ((y - 128) * 255 + (255 - y) * x) / 127;
  576.       }
  577.  
  578.  2. Contrast adjust
  579.  
  580.     for (y = 0; y <= 255; ++y)
  581.       for (x = 0; x < 256; ++x) {
  582.         if (y <= 128) *table++ = (128 * (128 - y) + y * x) / 128;
  583.         else {
  584.           int tmp;
  585.           
  586.           tmp = (x * 127 + MAX_SLOPE * (y - 128) * (x - 128)) / 127;
  587.                 /* slope = 1 .. 1 + MAX_SLOPE */
  588.           if (tmp > 255) tmp = 255;
  589.           else if (tmp < 0) tmp = 0;      
  590.           *table++ = tmp;
  591.         }
  592.       }
  593.  
  594.  Table size is of 256 * 256 (i.e. 64k) bytes.
  595.  Where
  596.    x : means the pixel taken from input image.
  597.    y : means the pixel taken from mask image.
  598.    MAX_SLOPE : is 3 in DISPLAY.
  599.  
  600.  
  601.  
  602. --------------------------------------------------------------------------------
  603.                            PART IV -- SOME TIPS
  604. --------------------------------------------------------------------------------
  605.  
  606. Making of 3D-Pictures to use with Red/Blue(Green) Glasses: (by Bernhard Maerz)
  607. ----------------------------------------------------------
  608.  
  609. First there is needed the following Color Table which will be used:
  610.  
  611.     for (y = 0; y < 256; ++y)
  612.       for (x = 0; x < 256; ++x) {
  613.          *table++ = x;         /* Blue  */
  614.          *table++ = 0;         /* Green */
  615.          *table++ = y;         /* Red   */
  616.       }
  617.  
  618. Because most converted 3D-Pictures are too dark, the brightness of the 
  619. Color Table could be increased little bit.
  620.  
  621. Then, the picture for the left eye must be loaded into any stack (it will
  622. be used as mask).
  623. The picture for the right eye must be loaded into memory and with it there
  624. have to be done the mask image translation.
  625.  
  626. (The picture for both eyes must be transformed to grey scale for correct
  627. output.)
  628.